home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Applications / Nuntius 1.2 / src / Nuntius / UGroupTreeView.h < prev    next >
Encoding:
Text File  |  1994-03-06  |  3.1 KB  |  106 lines  |  [TEXT/MPS ]

  1. // Copyright © 1992 Peter Speck, speck@dat.ruc.dk. All rights reserved.
  2. // UGroupTreeView.h
  3.  
  4. #define __UGROUPTREEVIEW__
  5.  
  6. #ifndef __UGRIDVIEW__
  7. #include <UGridView.h>
  8. #endif
  9.  
  10. #ifndef __FASTBITS__
  11. #include "FastBits.h"
  12. #endif
  13.  
  14. typedef SicnFastBits TreeSicn[2];
  15.  
  16. class TGroupTreeDoc;
  17. class TGroupTree;
  18. class TExpandGroupTracker;
  19. class TSubscribeGroupTracker;
  20. class TTreeTypeName;
  21. class TTreeTabKeyCommand;
  22.  
  23. #ifndef __FONTTOOLS__
  24. #include "FontTools.h"
  25. #endif
  26.  
  27. class TGroupTreeView : public TGridView 
  28. {
  29.     public:
  30.         pascal void DoKeyEvent(TToolboxEvent *event);
  31.         pascal void DoCommandKeyEvent(TToolboxEvent *event);
  32.         pascal void HighlightCells(RgnHandle theCells, HLState fromHL, HLState toHL);
  33.         pascal GridViewPart IdentifyPoint(const VPoint& thePoint, GridCell& aCell);
  34.  
  35.         void GetCellInformation(GridCell aCell, 
  36.                             long &level, long &noVisibleSubLines,
  37.                             Boolean &isFolder,
  38.                             CRect &triangleRect, CRect &iconRect, CRect &textRect,
  39.                             CStr255 &text);
  40.  
  41.         pascal void DoShowHelp(const VPoint& localPoint, RgnHandle helpRegion);
  42.         pascal void DrawCell(GridCell aCell, const VRect &aRect);
  43.         pascal void DrawRangeOfCells(GridCell startCell,
  44.                                          GridCell stopCell,
  45.                                          const VRect &aRect);
  46.         void DrawTrackedTriangle(GridCell aCell, Boolean asExpanded, Boolean halfExpanded, Boolean highlight);
  47.         void ExpandCompactCell(GridCell aCell, Boolean doExpand, Boolean wayDown);
  48.         void ExpandCompactSelection(Boolean doExpand, Boolean wayDown);
  49.  
  50.         void UpdateList();
  51.         ArrayIndex GetWindowFolderIndex();
  52.         TGroupTree *GetGroupTree();
  53.         
  54.         void WriteWindowInfo(TStream *aStream);
  55.         void ReadWindowInfo(TStream *aStream);
  56.         
  57.         pascal void DoMouseCommand(VPoint &theMouse, TToolboxEvent *event, CPoint hysteresis);
  58.         pascal void DoMenuCommand(CommandNumber aCommandNumber);
  59.         pascal void DoSetupMenus();
  60.         pascal void ShowReverted();
  61.  
  62.         void SetWindowFolder(ArrayIndex windowFolderIndex, TGroupTreeView *openFromView = nil);
  63.         
  64.         TGroupTreeView();
  65.         pascal void Close();
  66.         pascal void Initialize();
  67.         pascal void ReadFields(TStream *aStream);
  68.         pascal void DoPostCreate(TDocument *itsDocument);
  69.         pascal void Free();
  70.     private:
  71.         friend class TExpandGroupTracker;
  72.         friend class TSubscribeGroupTracker;
  73.         friend class TTreeTypeName;
  74.         friend class TTreeTabKeyCommand;
  75.         
  76.         TWindow *fWindow;
  77.         TGroupTreeDoc *fGroupTreeDoc;
  78.         TGroupTree *fGroupTree;
  79.         TLongintList *fExpandData;
  80.         ArrayIndex fWindowFolderIndex;
  81.         long fLevelOffset;
  82.  
  83.         StandardGridViewTextStyle fGridViewTextStyle;
  84.         BitMap *fPortBitsP;
  85.         short fScreenDepth;
  86.         short fCellHeight;
  87.         
  88.         unsigned long fLastTypeKeyTick;
  89.         CStr255 fKeyTypeChars;
  90.  
  91.         void OpenSelection(Boolean updateDatabase);
  92.         void DoSuperKey(TToolboxEvent *event);
  93.         
  94.         void ChangedFont();
  95.         void UpdateDrawInfo();
  96.         void DrawSmallIcon(const SicnFastBits *sicn, CRect iconRect, Boolean drawSelected);
  97.         void DrawTheCell(GridCell aCell);
  98.         void HighlighTheCell(GridCell aCell, HLState fromHL, HLState toHL);
  99.  
  100.         void DoTheGetCellInformation(GridCell aCell,
  101.                             ArrayIndex &nodeIndex, long &level, ArrayIndex &noVisibleSubLines,
  102.                             Boolean &isFolder,
  103.                             CRect &triangleRect, CRect &iconRect, CRect &textRect,
  104.                             CStr255 &text);
  105. };
  106.